import BaseApi from '../BaseApi';

const controller = "/GuideScreenManege";

export default {
    /**
     * @description 获取设备信息列表
     * @author LiuTing
     * @date 2021/6/27
     */
    getGuideScreenInfoList(condition) {
        return this.requestPost(controller, "/getGuideScreenInfoList", condition);
    },

    /**
     * @description 增加一条设备信息
     */
    addOneGuideScreen(condition) {
        return this.requestPost(controller, "/addOneGuideScreen", condition);
    },

    /**
     * @description 删除一条设备信息
     */
    delGuideScreen(value) {
        return this.requestPostForJson(controller, "/delGuideScreen", value);
    },

    /**
     * @description 更新诱导屏信息（同步更新与车位的绑定关系）
     */
    updateGuideScreen(value) {
        return this.requestPost(controller, "/updateGuideScreen", value);
    },

    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);
    },

    requestDownloadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    },

    requestPostForJson(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPostForJson(newUrl, condition);
    },

}